The invention relates to calibration of imaging systems and more specifically to calibration to compensate for a flange focal distance error due to manufacturing tolerances.
The machine vision industry has developed digital camera systems for obtaining high quality images used for code identification and decoding as well as for vision inspection systems. A digital camera typically includes a two dimensional CMOS or CCD sensor array, a lens assembly, a lens mounting flange and a camera processor. The lens assembly attaches to the lens mounting flange which is supposed to position the lens assembly at a specific distance from the sensor. For instance, in the case of a C-mount camera, a specified distance between the mounting flange and the sensor plane is 17.526 millimeters. Similarly, in the case of a CS-mount camera, a specified distance between the mounting flange and the sensor plane is 12.5 millimeters. The processor is programmed to control the lens in a manner calculated to control the focal distance of the camera where control characteristics are based at least in part on the specified distance between the mounting flange and the sensor array.
One type of lens assembly is a motorized lens type wherein a motor is used to move lens components along an optical axis to adjust focal distance. Another type of lens assembly is a variable optical power type assembly such as a liquid lens where, instead of moving the lens along the optical axis to adjust the focal distance, the shape of the lens is modified to adjust the distance. To control a motorized lens, the processor adjusts control signals to the lens to drive a lens motor to modify the focal distance. To control a liquid lens, the processor adjusts a voltage applied to the lens to change the shape of the lens thereby adjusting the focal distance.
Some camera systems have been developed that can be used with many different types of lenses. Where several different types of liquid lenses may be used with a single camera assembly, the different lenses typically have different lens specific operating characteristics that are stored in a memory device mounted to the lens that, among other things, can be used to calculate how the processor is to control the lens to adjust focal distance. When a liquid lens is attached to the mounting flange, the processor reads the operating characteristics from the lens memory device and thereafter controls the lens in a manner consistent with the operating characteristics and the camera mount type (e.g., C-mount, CS-mount, other). For instance, the operating characteristics and characteristics of a specific camera mount type may be useable to calculate a voltage to apply to the lens to control the shape of the lens and cause a specific optical power to occur.
One problem with existing CCD or CMOS based camera systems is that manufacturing tolerances related to the CCD or CMOS sensor array often result in a flange focal distance error which in turn causes a focal distance error. For example, a CCD sensor array includes a CCD array mounted on a printed circuit board which is then mounted within a system support structure. The thickness of the PCB and array can vary appreciably and result in a flange focal distance error (i.e., a deviation from the specified or ideal flange focal distance for a specific lens type). Tolerance in the position of a sensor die in its package also contributes appreciably to the flange focal distance error. It has been empirically determined that the flange focal distance error can result in a focusing error that is greater than the depth of field in certain vision applications such that the error substantially impacts performance of an overall system.
One solution to the problems associated with the flange focal distance error is to factory calibrate the combination of a sensor array (e.g., a CCD array) and a specific lens (e.g., a liquid lens of a specific type) prior to shipping the combination. While this solution works well in cases where only the factory installed lens will be used with a sensor array, this solution does not allow other lenses with varying capabilities to be swapped for the factory installed lens.
Another solution is to integrate a calibration target into a camera assembly at a known distance from the sensor array or into an application environment at a known distance from the sensor array and program the system to recalibrate itself each time the assembly is booted up during a commissioning procedure. A similar solution is to field calibrate a sensor array and lens combination with a target placed a known distance from the sensor array after the system is installed. Either of these solutions, unfortunately, require additional commissioning procedure steps. In addition, these solutions include processes that must be repeated every time one type of lens is swapped for a different type of lens.
Another solution to the problems associated with the flange focal distance error would be to provide a mechanical adjustment mechanism for adjusting the flange focal distance between the mounting flange and the sensor plane after manufacture to compensate for or eliminate the focal distance error. This solution, while possible, would require an extremely precise mechanical adjustment assembly and therefore would require additional system components and would increase overall cost.
One other solution is to design a closed loop autofocus system where a sequence of images are obtained and the system adjusts the lens to set an optimal focal distance based on measured image sharpness. This solution does not work well in fast moving applications where there is insufficient time to analyze a series of images and adjust focus between each obtained image to hunt for a focused setting.
Thus, it would be advantageous to have a camera system that could automatically compensate for flange focal distance error regardless of the type of lens used with the system.